package com.xbongbong.paas.service;

import com.xbongbong.pro.businessrule.pojo.BusinessRuleDataPojo;
import com.xbongbong.pro.businessrule.pojo.dto.OperationDTO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.script.pojo.dto.BusinessRuleSetWhiteListDTO;
import com.xbongbong.pro.script.pojo.vo.ScriptVO;

/**
 * @author: wufeng
 * @date: 2019/1/3 10:34
 * @desrcption: 业务规则-添加和更新
 */
public interface BusinessRuleService {
    /**
     * 更新和添加数据
     * @param operationDTO
     * @throws XbbException
     */
    void addAndUpdate(OperationDTO  operationDTO) throws XbbException;
    /**
     * 仅添加
     * @param operationDTO
     * @throws XbbException
     */
    void onlyAdd(OperationDTO  operationDTO) throws XbbException;
    /**
     * 仅更新
     * @param operationDTO
     * @throws XbbException
     */
    void onlyUpdate(OperationDTO  operationDTO, BusinessRuleDataPojo businessRuleDataPojo) throws XbbException;

    /**
     * 仅删除
     * @param operationDTO
     * @throws XbbException
     */
    void onlyDelete(OperationDTO  operationDTO) throws XbbException;

    /**
     * 设置白名单
     * @param businessRuleSetWhiteListDTO
     * @return
     * @throws XbbException
     */
    ScriptVO setWhiteList(BusinessRuleSetWhiteListDTO businessRuleSetWhiteListDTO) throws XbbException;
}
